/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jforum.actions;

import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jforum.DAO.MessageDAO;
import jforum.domain.User;
import jforum.util.AuthModule;
import jforum.util.DBConnector;

/**
 * Действие просмотра сообщений верхнего уровня
 * @author Вадим
 */
public class ViewMessagesFormAction implements Action {

    public String perform(HttpServletRequest request, HttpServletResponse response) throws Exception {
        DBConnector conn=DBConnector.getInstance();
        MessageDAO dao=new MessageDAO(conn);
        List messages = dao.LoadParents();
        request.setAttribute("messages",messages);
        return ActionNames.messages_page;
    }

}
